Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mount.zfs -o zfsutil leverages zfs_mount_at() #13021

Merged
merged 1 commit into from
Feb 8, 2022
Merged

mount.zfs -o zfsutil leverages zfs_mount_at() #13021

merged 1 commit into from
Feb 8, 2022

Conversation

szubersk
Copy link
Contributor

@szubersk szubersk commented Jan 26, 2022

Motivation and Context

mount.zfs -o zfsutil doesn't propagate correctly dataset's mount options (e. g. atime, relatime), e. g. #7947

Description

Using zfs_mount_at() gives opportunity to properly propagate
mountopts from what's stored in a pool to the mount(2) syscall
invocation. It fixes cases when mount options are set to incorrect
values and rectification is impossible (e. g. Linux initrd boot
sequence in #7947).
Moved debug information printing after all variables are
initialized - printed text reflects what is passed to mount(2).

How Has This Been Tested?

  • ZTS
  • manual invocations of mount.zfs -o zfsutil

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Performance enhancement (non-breaking change which improves efficiency)
  • Code cleanup (non-breaking change which makes code smaller or more readable)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Library ABI change (libzfs, libzfs_core, libnvpair, libuutil and libzfsbootenv)
  • Documentation (a change to man pages or other documentation)

Checklist:

@szubersk szubersk marked this pull request as ready for review January 27, 2022 18:25
@szubersk
Copy link
Contributor Author

szubersk commented Jan 28, 2022

It is incredibly odd that we get consistent failures on FreeBSD

Tests with results other than PASS that are unexpected:
    FAIL alloc_class/alloc_class_012_pos (expected PASS)
    FAIL cli_root/zpool_events/zpool_events_clear (expected PASS)

especially that cmd/mount_zfs is not compiled at all for FreeBSD platforms.

EDIT
#13036

@ghost
Copy link

ghost commented Jan 28, 2022

Yes that is odd, and of course not related to changes in this PR.

@behlendorf behlendorf added the Status: Code Review Needed Ready for review and testing label Feb 4, 2022
Using `zfs_mount_at()` gives opportunity to properly propagate
mountopts from what's stored in a pool to the `mount(2)` syscall
invocation. It fixes cases when mount options are set to incorrect
values and rectification is impossible (e. g. Linux initrd boot
sequence in #7947).
Moved debug information printing after all variables are
initialized - printed text reflects what is passed to `mount(2)`.

Signed-off-by: szubersk <szuberskidamian@gmail.com>
@behlendorf behlendorf added Status: Accepted Ready to integrate (reviewed, tested) and removed Status: Code Review Needed Ready for review and testing labels Feb 7, 2022
@behlendorf behlendorf merged commit d7a6740 into openzfs:master Feb 8, 2022
@szubersk szubersk deleted the szubersk-atime branch February 10, 2022 08:57
tonyhutter pushed a commit to tonyhutter/zfs that referenced this pull request Feb 15, 2022
Using `zfs_mount_at()` gives opportunity to properly propagate
mountopts from what's stored in a pool to the `mount(2)` syscall
invocation. It fixes cases when mount options are set to incorrect
values and rectification is impossible (e. g. Linux initrd boot
sequence in openzfs#7947).
Moved debug information printing after all variables are
initialized - printed text reflects what is passed to `mount(2)`.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: szubersk <szuberskidamian@gmail.com>
Issue openzfs#7947 
Closes openzfs#13021
tonyhutter pushed a commit to tonyhutter/zfs that referenced this pull request Feb 16, 2022
Using `zfs_mount_at()` gives opportunity to properly propagate
mountopts from what's stored in a pool to the `mount(2)` syscall
invocation. It fixes cases when mount options are set to incorrect
values and rectification is impossible (e. g. Linux initrd boot
sequence in openzfs#7947).
Moved debug information printing after all variables are
initialized - printed text reflects what is passed to `mount(2)`.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: szubersk <szuberskidamian@gmail.com>
Issue openzfs#7947 
Closes openzfs#13021
tonyhutter pushed a commit to tonyhutter/zfs that referenced this pull request Feb 17, 2022
Using `zfs_mount_at()` gives opportunity to properly propagate
mountopts from what's stored in a pool to the `mount(2)` syscall
invocation. It fixes cases when mount options are set to incorrect
values and rectification is impossible (e. g. Linux initrd boot
sequence in openzfs#7947).
Moved debug information printing after all variables are
initialized - printed text reflects what is passed to `mount(2)`.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: szubersk <szuberskidamian@gmail.com>
Issue openzfs#7947 
Closes openzfs#13021
nicman23 pushed a commit to nicman23/zfs that referenced this pull request Aug 22, 2022
Using `zfs_mount_at()` gives opportunity to properly propagate
mountopts from what's stored in a pool to the `mount(2)` syscall
invocation. It fixes cases when mount options are set to incorrect
values and rectification is impossible (e. g. Linux initrd boot
sequence in openzfs#7947).
Moved debug information printing after all variables are
initialized - printed text reflects what is passed to `mount(2)`.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: szubersk <szuberskidamian@gmail.com>
Issue openzfs#7947 
Closes openzfs#13021
nicman23 pushed a commit to nicman23/zfs that referenced this pull request Aug 22, 2022
Using `zfs_mount_at()` gives opportunity to properly propagate
mountopts from what's stored in a pool to the `mount(2)` syscall
invocation. It fixes cases when mount options are set to incorrect
values and rectification is impossible (e. g. Linux initrd boot
sequence in openzfs#7947).
Moved debug information printing after all variables are
initialized - printed text reflects what is passed to `mount(2)`.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: szubersk <szuberskidamian@gmail.com>
Issue openzfs#7947 
Closes openzfs#13021
snajpa pushed a commit to vpsfreecz/zfs that referenced this pull request Oct 22, 2022
Using `zfs_mount_at()` gives opportunity to properly propagate
mountopts from what's stored in a pool to the `mount(2)` syscall
invocation. It fixes cases when mount options are set to incorrect
values and rectification is impossible (e. g. Linux initrd boot
sequence in openzfs#7947).
Moved debug information printing after all variables are
initialized - printed text reflects what is passed to `mount(2)`.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: szubersk <szuberskidamian@gmail.com>
Issue openzfs#7947 
Closes openzfs#13021
snajpa pushed a commit to vpsfreecz/zfs that referenced this pull request Oct 22, 2022
Using `zfs_mount_at()` gives opportunity to properly propagate
mountopts from what's stored in a pool to the `mount(2)` syscall
invocation. It fixes cases when mount options are set to incorrect
values and rectification is impossible (e. g. Linux initrd boot
sequence in openzfs#7947).
Moved debug information printing after all variables are
initialized - printed text reflects what is passed to `mount(2)`.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: szubersk <szuberskidamian@gmail.com>
Issue openzfs#7947 
Closes openzfs#13021
snajpa pushed a commit to vpsfreecz/zfs that referenced this pull request Oct 23, 2022
Using `zfs_mount_at()` gives opportunity to properly propagate
mountopts from what's stored in a pool to the `mount(2)` syscall
invocation. It fixes cases when mount options are set to incorrect
values and rectification is impossible (e. g. Linux initrd boot
sequence in openzfs#7947).
Moved debug information printing after all variables are
initialized - printed text reflects what is passed to `mount(2)`.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: szubersk <szuberskidamian@gmail.com>
Issue openzfs#7947 
Closes openzfs#13021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Accepted Ready to integrate (reviewed, tested)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants